$url = "https://github.com/mmin18/RealtimeBlurView/archive/refs/tags/1.2.1.zip"
$output = "RealtimeBlurView.zip"
$extractPath = "library/src/main/java/com/github/mmin18/widget"

# 创建目录
New-Item -ItemType Directory -Force -Path $extractPath

# 下载文件
Invoke-WebRequest -Uri $url -OutFile $output

# 解压文件
Expand-Archive -Path $output -DestinationPath "temp" -Force

# 复制文件
Copy-Item "temp/RealtimeBlurView-1.2.1/library/src/main/java/com/github/mmin18/widget/*" -Destination $extractPath -Recurse -Force

# 清理
Remove-Item $output
Remove-Item "temp" -Recurse -Force 